home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / xpcom / nsIPropertyBag.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  3KB  |  114 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIPropertyBag.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIPropertyBag_h__
  6. #define __gen_nsIPropertyBag_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsIVariant; /* forward declaration */
  18.  
  19. class nsISimpleEnumerator; /* forward declaration */
  20.  
  21.  
  22. /* starting interface:    nsIPropertyBag */
  23. #define NS_IPROPERTYBAG_IID_STR "bfcd37b0-a49f-11d5-910d-0010a4e73d9a"
  24.  
  25. #define NS_IPROPERTYBAG_IID \
  26.   {0xbfcd37b0, 0xa49f, 0x11d5, \
  27.     { 0x91, 0x0d, 0x00, 0x10, 0xa4, 0xe7, 0x3d, 0x9a }}
  28.  
  29. class NS_NO_VTABLE nsIPropertyBag : public nsISupports {
  30.  public: 
  31.  
  32.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPROPERTYBAG_IID)
  33.  
  34.   /**
  35.      * Get a nsISimpleEnumerator whose elements are nsIProperty objects.
  36.      */
  37.   /* readonly attribute nsISimpleEnumerator enumerator; */
  38.   NS_IMETHOD GetEnumerator(nsISimpleEnumerator * *aEnumerator) = 0;
  39.  
  40.   /**
  41.      * Get a property value for the given name.
  42.      * @throws NS_ERROR_FAILURE if a property with that name doesn't
  43.      * exist.
  44.      */
  45.   /* nsIVariant getProperty (in AString name); */
  46.   NS_IMETHOD GetProperty(const nsAString & name, nsIVariant **_retval) = 0;
  47.  
  48. };
  49.  
  50. /* Use this macro when declaring classes that implement this interface. */
  51. #define NS_DECL_NSIPROPERTYBAG \
  52.   NS_IMETHOD GetEnumerator(nsISimpleEnumerator * *aEnumerator); \
  53.   NS_IMETHOD GetProperty(const nsAString & name, nsIVariant **_retval); 
  54.  
  55. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  56. #define NS_FORWARD_NSIPROPERTYBAG(_to) \
  57.   NS_IMETHOD GetEnumerator(nsISimpleEnumerator * *aEnumerator) { return _to GetEnumerator(aEnumerator); } \
  58.   NS_IMETHOD GetProperty(const nsAString & name, nsIVariant **_retval) { return _to GetProperty(name, _retval); } 
  59.  
  60. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  61. #define NS_FORWARD_SAFE_NSIPROPERTYBAG(_to) \
  62.   NS_IMETHOD GetEnumerator(nsISimpleEnumerator * *aEnumerator) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEnumerator(aEnumerator); } \
  63.   NS_IMETHOD GetProperty(const nsAString & name, nsIVariant **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetProperty(name, _retval); } 
  64.  
  65. #if 0
  66. /* Use the code below as a template for the implementation class for this interface. */
  67.  
  68. /* Header file */
  69. class nsPropertyBag : public nsIPropertyBag
  70. {
  71. public:
  72.   NS_DECL_ISUPPORTS
  73.   NS_DECL_NSIPROPERTYBAG
  74.  
  75.   nsPropertyBag();
  76.  
  77. private:
  78.   ~nsPropertyBag();
  79.  
  80. protected:
  81.   /* additional members */
  82. };
  83.  
  84. /* Implementation file */
  85. NS_IMPL_ISUPPORTS1(nsPropertyBag, nsIPropertyBag)
  86.  
  87. nsPropertyBag::nsPropertyBag()
  88. {
  89.   /* member initializers and constructor code */
  90. }
  91.  
  92. nsPropertyBag::~nsPropertyBag()
  93. {
  94.   /* destructor code */
  95. }
  96.  
  97. /* readonly attribute nsISimpleEnumerator enumerator; */
  98. NS_IMETHODIMP nsPropertyBag::GetEnumerator(nsISimpleEnumerator * *aEnumerator)
  99. {
  100.     return NS_ERROR_NOT_IMPLEMENTED;
  101. }
  102.  
  103. /* nsIVariant getProperty (in AString name); */
  104. NS_IMETHODIMP nsPropertyBag::GetProperty(const nsAString & name, nsIVariant **_retval)
  105. {
  106.     return NS_ERROR_NOT_IMPLEMENTED;
  107. }
  108.  
  109. /* End of implementation class template. */
  110. #endif
  111.  
  112.  
  113. #endif /* __gen_nsIPropertyBag_h__ */
  114.